from conanbase import ConanBase, copy, os


required_conan_version = ">=1.60.0"

class HelpConan(ConanBase):
    
    def build(self):
        pass

    def package(self):
        files_to_copy = [
            ("permissions.ini", self.source_folder, self.package_folder),
            ("*", os.path.join(self.source_folder, f"src/{self.options.board_name}/{self.options.board_name}_cn"), os.path.join(self.package_folder, "opt/bmc/web/htdocs/help/zh-cn")),
            ("*", os.path.join(self.source_folder, f"src/{self.options.board_name}/{self.options.board_name}_en"), os.path.join(self.package_folder, "opt/bmc/web/htdocs/help/en-us")),
            ("*", os.path.join(self.source_folder, f"src/{self.options.board_name}/{self.options.board_name}_fr"), os.path.join(self.package_folder, "opt/bmc/web/htdocs/help/fre-fr")),
            ("*", os.path.join(self.source_folder, f"src/{self.options.board_name}/{self.options.board_name}_ja"), os.path.join(self.package_folder, "opt/bmc/web/htdocs/help/jap-ja")),
            ("*", os.path.join(self.source_folder, f"src/{self.options.board_name}/{self.options.board_name}_ru"), os.path.join(self.package_folder, "opt/bmc/web/htdocs/help/ru-ru"))
        ]

        for pattern, src, dst in files_to_copy:
            copy(self, pattern, src=src, dst=dst, keep_path=True)
